const router = require("express").Router();
const db = require("../config/db");

// 学生信息接口
router.post("/delpropertymsg", (req, res) => {
  // 接受前端传来的数据
  let { multipleSelection } = req.body;

  let arrid = multipleSelection.map((item) => {
    return item.id;
  });

  // console.log(arrid);
  let value = arrid.join(",");
  // console.log(value);
  let sql = "delete from property where id in (" + value + ")";
  if (value != "") {
    db.query(sql, (results) => {
      res.send({
        code: 200,
      });
    });
  }
});
module.exports = router;
